package com.fdl.service.security.impl;

import org.acegisecurity.captcha.CaptchaServiceProxy;

import com.fdl.common.utils.StringUtil;
import com.octo.captcha.service.CaptchaServiceException;

/**
 * 
 * @description 
 * @project: hb-intra
 * @Date:2010-8-4
 * @version  1.0
 * @Company: 33e9
 * @author zhangYong.huang
 */
public class JCaptchaServiceProxyImpl implements CaptchaServiceProxy {
	

	public boolean validateReponseForId(String id, Object response) {
		try {
			 if(!StringUtil.isEmpty(id) 
					 && response != null 
					 && id.equalsIgnoreCase((String)response)){
				 return true;
			 }else{
				 return false;
			 }
		} catch (CaptchaServiceException cse) {
			return false;
		}
	}
}
